#if !defined(FAKE_D3D10_DEVICE1_H)
#define FAKE_D3D10_DEVICE1_H

#include <d3d10_1.h>
#include <rt/Exceptions/COMException.h>
#include "Fakes/FakeD3D10Device.h"

class FakeD3D10Device1 : public ID3D10Device1
{
public:
	FakeD3D10Device1()
		: Device(),
		CreateShaderResourceView1Called(false), CreateShaderResourceView1LastResource(0), CreateShaderResourceView1LastDesc(0), CreateShaderResourceView1FakeResult(0), CreateShaderResourceView1FakeHResult(E_FAIL),
		CreateBlendState1Called(false), CreateBlendState1LastDesc(0), CreateBlendState1FakeResult(0), CreateBlendState1FakeHResult(E_FAIL)
	{
	}
	bool CreateShaderResourceView1Called;
	ID3D10Resource *CreateShaderResourceView1LastResource;
	D3D10_SHADER_RESOURCE_VIEW_DESC1 const *CreateShaderResourceView1LastDesc;
	ID3D10ShaderResourceView1 *CreateShaderResourceView1FakeResult;
	HRESULT CreateShaderResourceView1FakeHResult;
	bool CreateBlendState1Called;
	D3D10_BLEND_DESC1 const *CreateBlendState1LastDesc;
	ID3D10BlendState1 *CreateBlendState1FakeResult;
	HRESULT CreateBlendState1FakeHResult;

	CONTAIN_DEVICE(Device);

	virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView1(ID3D10Resource *pResource, const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, ID3D10ShaderResourceView1 **ppSRView)
	{
		CreateShaderResourceView1Called = true;
		CreateShaderResourceView1LastResource = pResource;
		CreateShaderResourceView1LastDesc = pDesc;
		*ppSRView = CreateShaderResourceView1FakeResult;
		return CreateShaderResourceView1FakeHResult;
	}
	virtual HRESULT STDMETHODCALLTYPE CreateBlendState1(const D3D10_BLEND_DESC1 *pBlendStateDesc, ID3D10BlendState1 **ppBlendState)
	{
		CreateBlendState1Called = true;
		CreateBlendState1LastDesc = pBlendStateDesc;
		*ppBlendState = CreateBlendState1FakeResult;
		return CreateBlendState1FakeHResult;
	}
	virtual D3D10_FEATURE_LEVEL1 STDMETHODCALLTYPE GetFeatureLevel() { throw rt::NotImplementedException(); }
};

#endif
